#include "cpu/exec/template-start.h"

#include "cpu/exec/judge_jcc.h"

#define make_jcc(jcc_name) \
    make_helper(concat4(j, jcc_name, _, SUFFIX)) { \
        int len; \
        len = concat(decode_si_, SUFFIX)(eip + 1); \
        print_asm("%s\t0x%x",str(concat(j, jcc_name)), eip + 1 + len + op_src->val); \
        if(concat(judge_, jcc_name)()) { \
            cpu.eip += op_src->val; \
        } \
        return len + 1; \
    } 

make_jcc(e) 
make_jcc(ne)
make_jcc(s)
make_jcc(ns)
make_jcc(p)
make_jcc(np)
make_jcc(o)
make_jcc(no)
make_jcc(b)
make_jcc(nb)
make_jcc(na)
make_jcc(a)
make_jcc(l)
make_jcc(ge)
make_jcc(le)
make_jcc(g)


#include "cpu/exec/template-end.h"